1. Field of the Invention
A present invention relates to an image display apparatus to display a plurality of objects in a space as a 2-dimension image.
2. Description of the Related Art
In computer graphics and so on, when a plurality of objects are displayed on a screen as a 2-dimension image on which shading is performed, the following processes are performed.
(1) Each of the plurality of objects is approximated by polyhedrons. The vertex coordinate of each of the vertexes of each of the polygons that constitute each of the polyhedrons is transformed to a coordinate on a coordinate system of an image space in which a depth coordinate is added to the 2-dimension coordinate of a projection plane. Then, a column (x) address and row (y) address of each vertex on the screen and a coordinate value in a depth direction of the vertex are determined. Also, a brightness value of each vertex of each polygon is determined based on the position of a light source, the viewpoint and so on. Further, information of each of the sides of each polygon is determined from the values of the vertexes of the polygon. PA1 (2) When a scanning line in a row direction intersects with one of the polygons, column addresses and depth values of the intersection points of the scanning line with the polygon and brightness values of the intersection points are determined for every scanning line. A depth value and a brightness value of each of the pixels between the intersection points of each scanning line with the polygon are determined from the above-mentioned values of the intersection points. These determined values are stored in storage areas which are referred to as a Z buffer and an I buffer. PA1 (3) In order to erase a hidden plane in this method, each of determined depth values and the value that is stored in a buffer are compared with each other. If the determined depth value is smaller than the stored value, the values of the Z buffer and the I buffer are rewritten by the determined depth value and brightness. PA1 (4) The above-mentioned processes are executed for each of all the polygons for the objects to be displayed. In this manner, an image is generated and displayed.
In this method of displaying an image, the Z buffer for one screen is necessary in addition to the I buffer for storing the brightness value of each of the pixels on the screen. Also, in this method, many memories are necessary for the X buffer. Further, it is necessary to use a high-speed memory to access the Z buffer at high speed.
In order to solve these problems, a method is known in which each of the objects is displayed every scanning line of the screen, as shown in Japanese Laid Open Patent Disclosure (JP-A-Heisei 2-281386). FIG. 1 is a block diagram illustrating the structure of the conventional example.
Referring to FIG. 1, in the conventional example of an image display apparatus, an object number is set for every object by an object number generating section 110. Then, an object information set of each of the objects is stored in an object information storing section 114 in correspondence to each object number. On the other hand, when the scanning line is scanned on the screen in order starting from the top line, the scanning line when the object is displayed on the screen for the first time and the scanning line when the display of the object is ended on the screen are determined for every object by a display start/end scanning line determining section 111. These scanning lines are referred to as the display start scanning line and the display end scanning line, respectively. Then, the display end scanning line of each object is stored in a display end scanning line storing section 113 in correspondence to the object number of the object. Also, the object number of the object is stored in a table storing section 112 for every object in correspondence to the scanning line which is the start scanning line for the object. In this manner, the object number of each of the objects can be stored in correspondence to the display start scanning line of the object. A FIFO buffer section 130 in which a plurality of object numbers are stored is initialized to "0".
Next, an image is generated in order from the first scanning line for every scanning line and is displayed. For this purpose, all the object numbers of objects having the first scanning line as the display start scanning line are read out from the table storing section 112 and added to the FIFO buffer section 130. Then, all the object numbers stored in the FIFO buffer section 130 are sequentially outputted one by one, and the following processing is performed to each of the read object numbers.
That is, the object information set corresponding to the outputted object number is outputted from the object information storing section 114. Then, a display image for displaying the object corresponding to the outputted object number on the first scanning line is generated from the object information set by a display information generating section 116. On the other hand, the display end scanning line corresponding to the outputted object number is outputted from the display end scanning line storing section 113. Then, whether or not the display end scanning line for the object is the first scanning line is determined by the display end determining section 115. Thus, the determination of the display end on the object is performed.
At this time, if the current scanning line is not the display end scanning line of the object, the outputted object number is returned to the FIFO buffer section 130. However, when the first scanning line as the current scanning line is determined to be coincident with the display end scanning line, the object number is not returned to the FIFO buffer section 130.
The above processing is performed to all the object numbers stored in the FIFO buffer section 130. The display image on the first scanning line is displayed by an image display section 117.
Next, a display image is generated for the second scanning line and is displayed. The method is substantially the same as with the first scanning line. However, the object numbers of all objects having the second scanning line as the display start scanning line are outputted from the table storing section 112 and are added to the content of the FIFO buffer section 130, which has been formed through the processing with the first scanning line, that is, to the object numbers of the objects which the display of the objects is not ended on the first scanning line but is continued on the second scanning line. Then, as in the first scanning line, all the object numbers are sequentially outputted from the FIFO buffer section 130 one by one, a display image on the second scanning line is generated and the image of the second scanning line is displayed. At the same time, if the display end scanning line of the object for the outputted object number is not the second scanning line, the outputted object number is returned to the FIFO buffer section 130 to form the content of the FIFO buffer section 130 that will be used by the third scanning line.
Thereafter, the same processing as in the second scanning line is repeated to the third scanning line, and subsequent scanning lines and an image of the objects is generated and displayed on the screen.
In the above-mentioned conventional method of displaying objects, there is a problem in that the storing sections must have a large capacity and the control of each of the storing sections is complicated. This is because a large amount of storing sections are required such as the FIFO buffer section 130 for temporarily storing the data read out from the table storing section 112 in addition to the display end scanning line storing section 113, the object information storage section 114, and the table storing section 112. Further, the FIFO buffer section 130 needs the capacity by which all the object numbers for one screen can be stored therein in a worst case scenario.
Also, there is a problem in that processing speed for determining the display information is slow because processing is sequentially performed for every scanning line, and is performed while accessing to the storing sections each time the sequential processing is performed.